package com.etoak.simHash;

import java.io.*;

/**
 * @author fair_wu
 * @version v1.0
 * @package com.etoak.simHash
 * @auther fair
 * @date 2021-01-03 下午 18:25
 */
public class ReadFile {
    public static String readFile(String filename){
        File file = new File(filename);
        String text = "";
        try {

            BufferedReader br = new BufferedReader(new FileReader(file));
            String s = "";
            while ((s = br.readLine()) != null){
                text += s ;

            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return text;
    }
}
